package com.kehutong.crm.app;

import com.kehutong.crm.service.DemandForecastService;
import org.coraframework.inject.Inject;
import org.coraframework.json.JSONObject;
import org.coraframework.mvc.MvcAction;
import org.coraframework.mvc.http.ReqMapping;

/**
 * 需求预测
 *
 * @author wupengfei
 */
@MvcAction
@ReqMapping("/kht-bin/demand")
public class DemandForecastAction {

    @Inject
    private DemandForecastService demandForecastService;

    @ReqMapping("/getByUserId")
    public Object getByUserId(String userId) throws Exception {
        return demandForecastService.getByUserId(userId);
    }

    @ReqMapping("/forecast")
    public Object getByTypeAndForecastValue(JSONObject jsonObject) {
        return demandForecastService.getByTypeAndForecastValue(jsonObject);
    }

}
